import { createRouter, createWebHistory } from 'vue-router'
import Index from '@/views/index.vue'
import Login from '@/views/login.vue'
import Sp from '@/views/sp.vue'
import NotFound from '@/views/404.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
   { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },
    { path: '/', redirect: '/login/sp' },
    {
      path: '/index',

      component: Index,
    },
    {
      path: '/login',

      component: Login,
      children: [
        {
          path: 'sp',

          component: Sp,
        },
      ]
    },

  ],
})

export default router
